import request from '@/utils/request'

// 查询监控配置列表
export function listConfig(query) {
  return request({
    url: '/monitor/config/list',
    method: 'get',
    params: query
  })
}

// // 查询监控配置详细
// export function getConfig(id) {
//   return request({
//     url: '/monitor/config/' + id,
//     method: 'get'
//   })
// }

// 新增监控配置
export function addConfig(data) {
  return request({
    url: '/monitor/config/add',
    method: 'post',
    data: data
  })
}

// 修改监控配置
export function updateConfig(data) {
  return request({
    url: '/monitor/config/update',
    method: 'post',
    data: data
  })
}

// 启用/停用监控
export function changeEnabled(data) {
  return request({
    url: '/monitor/config/change/enabled',
    method: 'post',
    data: data
  })
}

// 删除监控配置
export function delConfig(data) {
  return request({
    url: '/monitor/config/delete',
    method: 'post',
    data
  })
}
